package com.zlkj.pro.modular.admin.controller;

import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
import cn.stylefeng.roses.kernel.scanner.api.annotation.PostResource;
import com.zlkj.pro.modular.admin.model.dto.UserDTO;
import com.zlkj.pro.modular.admin.service.UsersService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


import static com.zlkj.pro.core.consts.ProjectConstants.BACKSTAGE_API_PREFIX;

@Slf4j
@RestController
@RequiredArgsConstructor
@ApiResource(name = "系统配置", path = BACKSTAGE_API_PREFIX + "/user")
public class UserController {
    @Resource
    UsersService usersService;

    @PostResource(path = "/detail", name = "系统用户_详情")
    public ResponseData detail(@RequestBody UserDTO dto) {
        return new SuccessResponseData(usersService.detail(dto));
    }


}
